﻿@model MealBooking.Core.Models.Dishes.DishCategory
@{
    Layout = "../Shared/_Layout.cshtml";
}
<!--Navbar-->
<div data-role="navbar" data-iconpos="left">
    <div class="float-left">
        <div data-role="controlgroup" data-type="horizontal" data-inset="true" data-mini="true">
            <a href="@Url.Action("EditDishCategory", new { id = Model.Id })" data-role="button">
                Edit</a>
            <button data-theme="a">
                Delete</button>
        </div>
    </div>
    @Html.Partial("_FloatRightPartial")
</div>
<!--Navbar End-->
@{
    var dishCategory = Model;
    <ul data-role="listview" data-inset="true" data-mini="true">
        <li data-role="list-divider"></li>
        <li>Name : @dishCategory.Name</li>
        @if (dishCategory.Category != null)
        {
            <li><a href="@Url.Action("MealCategoryDetail", "MealManager", new { id = dishCategory.Category.Id })">
                Meal Category :
                @dishCategory.Category.Name</a></li>
        }
        else
        {
            <li>Not Categoried Yet.</li>
        }
        @{
            var dishes = dishCategory.Dishes;
            if (dishes != null && dishes.Count != 0)
            {
            <li data-role="list-divider">Dishes : <span class="ui-li-count">@dishes.Count</span></li>            
                foreach (var dish in dishes)
                {
            <li><a href="@Url.Action("DishDetail", new { id = dish.Id })" title="@dish.Description">@dish.Name</a>
            </li>
                }
            }
            else
            {
            <li data-role="list-divider">No Dishes Yet.</li>
            } 
        }
        <li>Description : @dishCategory.Description</li>
    </ul>
}
